<template>
  <div class="page-user">
    <div class="top"></div>
    <user-top :user="user" @click-Edit="getEdit"></user-top>
    <div style="display: flex; justify-content: space-between;">
      <div style="width: 100%; background-color: white; padding: 0 20px;">
        <UserBody></UserBody>
      </div>
    </div>
  </div>
</template>

<script>
// import { getUserInfo } from '@/api/user'
import UserTop from './component/userTop.vue'
import UserBody from './component/userBody.vue'
export default {
  components: {
    UserTop,
    UserBody,
  },
  data() {
    return {
      user: {
        id: 1,
        cid: 248,
        uuid: 8543,
        uname: '法外张三',
        first_name: '王',
        last_name: '家伟',
        account: '84015972156',
        password: 'wjw123',
        uhead_img: '',
        tel: '18766665555',
        address: '东华小区A区4栋',
        email: '123@qq.com',
        token: 'cbwdycubjxnaknqiawubdu3iqbu',
        tag_total: '1',
        activity: [
          {
            uid: '481',
            name: '清洁街道志愿活动',
            address: '小区街道',
            begin: '2022-4-12 10:00:00',
            end: '2022-4-12 12:00:00',
            content: '清洁小区街道',
          },
        ],
        activity_total: '1',
        voluntary: {
          grade: '3',
          name: '朝气的志愿青年',
          time: '2022-4-10 10:00:00',
        },
      },
      // 是否打开修改个人信息弹窗
      isEdit: false,
    }
  },
  methods: {
    getEdit(val) {
      this.isEdit = val
      console.log(val)
    },
  },
  created() {
    // getUserInfo(1).then((respone) => {
    //   console.log(respone)
    // })
  },
}
</script>

<style scoped lang="less">
.page-user {
  // background-color: #f3f4f6;
  .top {
    width: 100%;
    height: 80px;
    // background-color: pink;
    background-image: url('@/assets/images/user.png');
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-position: center;
  }
}
</style>
